package com.lizemin.beanpostprocessor.controller;

import com.lizemin.beanpostprocessor.entity.Dog;
import com.lizemin.beanpostprocessor.entity.User;
import com.lizemin.beanpostprocessor.service.BeanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lzm
 * @date 2025/7/4 20:17
 * @description
 */
@RestController
@RequestMapping("/bean")
public class BeanController {

    @Autowired
    private BeanService beanService;

    @Autowired
    private Dog dog;

    @GetMapping("/getUser")
    public User getUser(Integer id) {
        return beanService.getUser(id);
    }

    @GetMapping("/getDog")
    public Dog getDog() {
        return dog;
    }

}
